package com.upcode.weighing.admin.controller;


import com.upcode.weighing.base.controller.BaseController;
import com.upcode.weighing.jpush.JpushUtil;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author alex
 * @since 2019-03-10
 */


@RestController
@RequestMapping("/test")
@Api(value = "/test", description = "微服务测试接口", produces = MediaType.ALL_VALUE)
public class TestController extends BaseController {

    private final Logger logger = LoggerFactory.getLogger(TestController.class);

    @Autowired
    private JpushUtil jpushUtil;

    @GetMapping("/a")
    public Object a() throws Exception {
        List<String> ali=new ArrayList<>();
        ali.add("ceshiji");
        //ali.add("zhupengtao");
        String notificationTitle="放假通知";
        String msgTitle="放假了";
        String msgContent="做好放假准备";
        //jpushUtil.sendToTagsList(tagsList,notificationTitle,msgTitle,msgContent,"无");
        jpushUtil.sendToAliasList(ali,notificationTitle,msgTitle,msgContent,"无");
        return success("hahah");
    }

}
